#include <stdio.h>
#include <stdlib.h>

void Bubble_sort(int A[], int N);
void Insertion_sort(int A[], int N);

int main()
{
    int N;
    scanf("%d", &N);
    int a[N];

    for(int i = 0; i < N; i++)
        scanf("%d", &a[i]);

    //Bubble_sort(a, N);
    Insertion_sort(a, N);

    for( int i =0; i<N; i++ )
    {
        printf("%d", a[i]);
        if(i != N-1)
            printf(" ");
        else
            printf("\n");
    }

    return 0;
}

void Bubble_sort(int A[], int N)
{
    for(int p = N-1; p >=0; p--)
    {
        int flag = 0;
        for(int i = 0; i < p; i++)
        {
            if(A[i] > A[i+1])
            {
                int tmp = A[i];
                A[i] = A[i+1];
                A[i+1] = tmp;
            }
            flag = 1;
        }
        if( flag == 0 )
            break;
    }
}
void Insertion_sort(int A[], int N)
{
    for(int p = 1; p < N; p++)
    {
        int tmp = A[p];
        int i;
        for(i = p; i>0&&A[i-1]>tmp;i--)
            A[i]=A[i-1];
        A[i] = tmp;
    }
}

